package com.leyou.item.service;

import com.leyou.item.pojo.SpecGroup;
import com.leyou.item.pojo.SpecParam;

import java.util.List;

public interface SpecificationService {

    /**
     * 根据分类id查询参数组
     * @param cid
     * @return
     */
    List<SpecGroup> queryGroupByCid(Long cid);

    /**
     *  根据条件查询规格参数
     * @param gid
     * @return
     */
    List<SpecParam> queryParams(Long gid,Long cid,Boolean generic,Boolean searching);

    void updateSpecGroup(SpecGroup specGroup);

    void updateSpecParam(SpecParam specParam);

    SpecGroup  deleteGroupById(Long id);

    SpecParam  deleteGroupsById(Long id);

    void saveSpecGroup(SpecGroup specGroup);

    void saveSpecParam(SpecParam specParam);

    /**
     * 根据cid查询规格参数
     * @param cid
     * @return
     */
    List<SpecGroup> queryGroupsWithParam(Long cid);
}
